package com.hha.entity;

public class Student {
    private String studentName;
    private int studentAge;
    private Teacher teacher;

    public Student(String studentName, int studentAge, Teacher teacher) {
        this.studentName = studentName;
        this.studentAge = studentAge;
        this.teacher = teacher;
    }

    public Student() {

    }

    public String getStudentName() {
        return studentName;
    }

    public void setStudentName(String studentName) {
        this.studentName = studentName;
    }

    public int getStudentAge() {
        return studentAge;
    }

    public void setStudentAge(int studentAge) {
        this.studentAge = studentAge;
    }

    public Teacher getTeacher() {
        return teacher;
    }

    public void setTeacher(Teacher teacher) {
        this.teacher = teacher;
    }

    @Override
    public String toString() {
        return "Student{" +
                "studentName='" + studentName + '\'' +
                ", studentAge=" + studentAge +
                ", teacher=" + teacher +
                '}';
    }
    public void stuf(){
        System.out.println(this.studentAge+"的"+this.studentName+"在学习");
    }
}
